# This is a config file for BeeGFS metadata nodes.
# http://www.beegfs.com


# --- [Table of Contents] ---
#
# 1) Settings
# 2) Command Line Arguments
# 3) Basic Settings Documentation
# 4) Advanced Settings Documentation


#
# --- Section 1.1: [Basic Settings] ---
#

sysMgmtdHost                 = {{ beegfs_mgmtd_host }}

storeMetaDirectory           = {{ beegfs_meta_dir }}
storeAllowFirstRunInit       = true


#
# --- Section 1.2: [Advanced Settings] ---
#

connAuthFile                 =
connBacklogTCP               = 1024
connFallbackExpirationSecs   = 900
connInterfacesFile           =
connMaxInternodeNum          = 32

connMetaPortTCP              = 8005
connMetaPortUDP              = 8005
connMgmtdPortTCP             = 8008
connMgmtdPortUDP             = 8008
connPortShift                = 0

connNetFilterFile            =

connUseRDMA                  = true
connRDMATypeOfService        = 0
connTcpOnlyFilterFile        =

logLevel                     = 3
logNoDate                    = false
logNumLines                  = 50000
logNumRotatedFiles           = 5
logStdFile                   = /var/log/beegfs-meta.log

runDaemonized                = true

storeClientXAttrs            = false
storeClientACLs              = false
storeUseExtendedAttribs      = true

sysTargetAttachmentFile      =
sysTargetOfflineTimeoutSecs  = 90
sysAllowUserSetPattern       = false

tuneBindToNumaZone           = 0
tuneNumStreamListeners       = 4
tuneNumWorkers               = 16
tuneTargetChooser            = roundrobin
tuneUseAggressiveStreamPoll  = false
tuneUsePerUserMsgQueues      = true


#
# --- Section 2: [Command Line Arguments] ---
#

# Use the command line argument "cfgFile=/etc/anotherconfig.conf" to
# specify a different config file for beegfs-meta.
# All other options in this file can also be used as command line
# arguments, overriding the corresponding config file values.


#
# --- Section 3: [Basic Settings Documentation] ---
#

# [sysMgmtdHost]
# Hostname (or IP) of the host running the management service.
# (See also "connMgmtdPortUDP" and "connMgmtdPortTCP")
# Default: <none>

# [storeMetaDirectory]
# The absolute path and name of a directory where the file system can store its
# metadata.
# Default: <none>

# [storeAllowFirstRunInit]
# Enables or disables daemon startup with an uninitialized storage directory.
# This can be used to make sure that the daemon does not run when the storage
# partition is not mounted (e.g. because it needs repair after a power outage).
# Note: This setting must be enabled during first startup of the daemon, but
#    may be disabled afterwards.
# Default: true


#
# --- Section 4: [Advanced Settings Documentation] ---
#

#
# --- Section 4.1: [Connections & Communication] ---
#

# [connAuthFile]
# The path to a file that contains a shared secret for connection based
# authentication. Only peers that use the same shared secret will be able to
# connect.
# Default: <none>

# [connBacklogTCP]
# The TCP listen backlog.
# Default: 128

# [connFallbackExpirationSecs]
# The time in seconds after which a connection to a fallback interface expires.
# When a fallback connection expires, the system will try to establish a new
# connection to the other hosts  primary interface (falling back to another
# interface again if necessary).
# Note: The priority of node interfaces can be configured using the
#    "connInterfacesFile" parameter.
# Default: 900

# [connInterfacesFile]
# The path to a text file that specifies the names of the interfaces, which
# may be used for communication by other nodes. One interface per line. The
# line number also defines the priority of an interface.
# Example: "ib0" in the first line, "eth0" in the second line.
# Values: This setting is optional. If unspecified, all available interfaces
#    will be published and priorities will be assigned automatically.
# Note: This has no influence on outgoing connections. The information is sent
#    to other hosts to inform them about possible communication paths.
# Default: <none>

# [connMaxInternodeNum]
# The maximum number of simultaneous connections to the same node.
# Default: 32

# [connMetaPortTCP], [connMetaPortUDP]
# The UDP and TCP ports of the metadata node.
# Default: 8005

# [connMgmtdPortTCP], [connMgmtdPortUDP]
# The UDP and TCP ports of the management node.
# Default: 8008

# [connPortShift]
# Shifts all following UDP and TCP ports according to the specified value.
# Intended to make port configuration easier in case you do not want to
# configure each port individually.
# Default: 0

# [connNetFilterFile]
# The path to a text file that specifies allowed IP subnets, which may be used
# for outgoing communication. One subnet per line in classless notation (IP
# address and number of significant bits).
# Example: "192.168.10.0/24" in the first line, "192.168.20.0/24" in the second
#    line.
# Values: This setting is optional. If unspecified, all addresses are allowed
#    for outgoing communication.
# Default: <none>

# [connUseRDMA]
# Enables the use of Remote Direct Memory Access (RDMA) for Infiniband.
# For this setting to be effective, OFED ibverbs support has to be enabled at
# compile time of the beegfs-opentk library.
# Default: true

# [connRDMATypeOfService]
# Infiniband provides the option to set a type of service for an application.
# This type of service can be used by your subnet manager to provide Quality of
# Service functionality (e.g. setting different service levels).
# In openSM the service type will be mapped to the parameter qos-class, which
# can be handled in your QoS configuration.
# See
# www.openfabrics.org/downloads/OFED/ofed-1.4/OFED-1.4-docs/QoS_management_in_OpenSM.txt
# for more information on how to configure openSM for QoS.
# This parameter sets the type of service for all outgoing connections of this
# daemon.
# Default: 0 (Max: 255)

# [connTcpOnlyFilterFile]
# The path to a text file that specifies IP address ranges to which no RDMA connection should be
# established. This is useful e.g. for environments where all hosts support RDMA, but some hosts
# cannot connect via RDMA to some other hosts.
# Example: "192.168.10.0/24" in the first line, "192.168.20.0/24" in the second
#    line.
# Values: This setting is optional.
# Default: <none>

#
# --- Section 4.2: [Logging] ---
#

# [logLevel]
# Defines the amount of output messages. The higher this level, the more
# detailed the log messages will be.
# Note: Levels above 3 might decrease performance.
# Default: 3 (Max: 5)

# [logNoDate]
# Defines whether "date & time" (=false) or the current "time only" (=true)
# should be logged.
# Default: false

# [logNumLines]
# The maximum number of lines per log file.
# Default: 50000

# [logNumRotatedFiles]
# The number of old files to keep when "logNumLines" is reached and the log file
# is rewritten (log rotation).
# Default: 5

# [logStdFile]
# The path and filename of the log file for standard log messages. If no name
# is specified, the messages will be written to the console.
# Default: /var/log/beegfs-meta.log


#
# --- Section 4.3: [Startup] ---
#

# [runDaemonized]
# Detach the process from its parent (and from stdin/-out/-err).
# Default: true


#
# --- Section 4.4: [Storage] ---
#

# [storeClientXAttrs]
# Enables client-side extended attributes.
# Note: Can only be enabled if the underlying file system supports extended
#    attributes.
# Note: This setting has to be explicitly enabled on the clients as well.
# Default: false

# [storeClientACLs]
# Enables the handling and storage of client-side access control lists.
# As ACLs are stored as extended attributes, this setting mainly concerns the
# enforcement and server-side propagation of directory default ACLs.
# Note: This setting can only be enabled if storeClientXAttrs is set to true.
# Note: This setting has to be explicitly enabled on all clients as well.
# Note: Enabling this setting can affect metadata performance.
# Default: false

# [storeUseExtendedAttribs]
# Controls whether BeeGFS metadata is stored as normal file contents (=false)
# or as extended attributes (=true) on the underlying files system. Depending on
# the type and version of your underlying local file system, extended attributes
# typically are significantly faster.
# Note: This setting can only be configured at first startup and cannot be
#    changed afterwards.
# Default: true


#
# --- Section 4.5: [System Settings] ---
#

# [sysTargetAttachmentFile]
# This file provides a specification of which targets should be grouped within
# the same domain for randominternode and randomintranode target chooser. This
# is useful e.g. if randominternode is used with multiple storage daemon
# instances running on the same physical hosts when files should be striped
# across different physical hosts.
# Format: Line-separated <targetID>=<domainID> definition.
# Example: "101=1" in first line, "102=1" in second line, "201=2" in third
#    line to define that targets "101" and "102" are part of the same
#    domain "1", while target "201" is part of a different domain "2". The
#    domain IDs in this file are arbitrary values in range 1..65535, the
#    targetIDs are actual targetIDs as in "beegfs-ctl --listtargets".
# Default: <none>

# [sysTargetOfflineTimeoutSecs]
# Timeout until targets on a storage server are considered offline by the
# management node when no target state updates can be fetched from that server.
# Note: This must be the same value as in the /etc/beegfs/beegfs-mgmtd.conf on
# the management node.
# Values: time in seconds
# Default: 180

# [sysAllowUserSetPattern]
# If set to true, non-privileged users are allowed to modify stripe pattern settings for
# directories they own.
# Default: false

#
# --- Section 4.6: [Tuning] ---
#

# [tuneBindToNumaZone]
# Defines the zero-based NUMA zone number to which all threads of this process
# should be bound. If unset, all available CPU cores may be used.
# Zone binding is especially useful if the corresponding devices (e.g. storage
# controller and network card) are also attached to the same zone.
# Note: The Linux kernel shows NUMA zones at /sys/devices/system/node/nodeXY
# Default: <unset>

# [tuneNumStreamListeners]
# The number of threads waiting for incoming data events. Connections with
# incoming data will be handed over to the worker threads for actual message
# processing.
# Default: 1

# [tuneNumWorkers]
# The number of worker threads. Higher number of workers allows the server to
# handle more client requests in parallel. On dedicated metadata servers, this
# is typically set to a value between four and eight times the number of CPU
# cores.
# Note: 0 means use twice the number of CPU cores (but at least 4).
# Default: 0

# [tuneTargetChooser]
# The algorithm to choose storage targets for file creation.
# Values:
#   * randomized: choose targets in a random fashion.
#   * roundrobin: choose targets in a deterministic round-robin fashion.
#        (Use this only for benchmarking of large-file streaming throughput.)
#   * randomrobin: randomized round-robin; choose targets in a deterministic
#        round-robin fashion, but random shuffle the result targets list.
#   * randominternode: choose random targets that are assigned to different
#        storage nodeIDs. (See sysTargetAttachmentFile if multiple storage
#        storage daemon instances are running on the same physical host.)
#   * randomintranode: choose random targets that are assigned to the same
#        nodeIDs (or same virtual domains if sysTargetAttachmentFile is
#        provided).
# Note: Only the randomized chooser honors client's preferred nodes/targets
#    settings.
# Default: randomized

# [tuneUseAggressiveStreamPoll]
# If set to true, the StreamListener component, which waits for incoming
# requests, will keep actively polling for events instead of sleeping until
# an event occurs. Active polling will reduce latency for processing of
# incoming requests at the cost of higher CPU usage.
# Default: false

# [tuneUsePerUserMsgQueues]
# If set to true, per-user queues will be used to decide which of the pending
# requests  is handled by the next available worker thread. If set to false,
# a single queue will be used and incoming requests will be processed in
# first-come, first-served order.
# Per-user queues are intended to improve fairness in multi-user environments.
# Default: false
